/**
 * Created by leon on 16/6/2.
 */

/* 如果内容尺寸小于屏幕高度 就拉伸高度为100% */
var windowH = $(window).height();
var mainH ;

$(function(){
    if(windowH > mainH){
    	mainH = $("#mainWindow").height();
        $("#mainWindow").css({height:windowH});
    }
});

/* 动态改变页面尺寸 */
var itemW = $(".col-sm-8").width();
var label = $(".label-and-input");
var placeholder = $(".placeholder-right");

window.onresize = function () {
    itemW = $(".col-sm-8").width();
//        console.log(itemW);
    changeDivHeight();
};

$(function () {
    changeDivHeight();
});

function changeDivHeight() {
    for (var i = 0; i < label.size(); i++) {
        var labelW = $(label[i]).width();
        $(placeholder[i]).css({width: itemW - labelW - 24});
    }
}
